<!DOCTYPE html> 
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,user-scalable=no,maximum-scale=1,initial-scale=1">
<title>产品展示</title>
<link type="text/css" href="css/css.css" rel="stylesheet" />
<link type="text/css" href="css/pz-mobile.css" rel="stylesheet" />
<script type="text/javascript" src="../js/pz-mobile.js"></script>
<style>
.panel_ul{list-style:none; padding:0px}
.panel_ul *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
.show_li{padding:5px;width:50%;float:left;}
.list_li{padding:5px;width:100%;}
.list_li .trade-panel{position:relative;height:70px;background:#fff;border: 0px solid transparent;border-radius: 5px;-webkit-border-radius: 5px;-webkit-box-shadow: 0px 2px 3px rgba(0,0,0,0.3);box-shadow: 0px 0px 3px rgba(0,0,0,0.3);}
.list_li img{height:70px; width:80px; border:5px #fff solid;}
.list_li .trade-ds{padding:5px; top:0; left:80px; position:absolute;background:none;border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
.list_li .show_name{ font-size:13px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;display:block;}
.list_li b{font-size:14px;color:#FF0000;padding-right:5px}
.list_li del{font-size:12px;color:#666;}
.list_li .point{font-size:12px;color:green;display:block;}

.show_li img{width:100%;border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0}
.show_li .trade-panel{background:#fff;border: 0px solid transparent;border-radius: 5px;-webkit-border-radius: 5px;-webkit-box-shadow: 0px 2px 3px rgba(0,0,0,0.3);box-shadow: 0px 0px 3px rgba(0,0,0,0.3);}
.show_li .trade-ds{padding:5px; height:65px;background:#fff;border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
.show_li .show_name{ font-size:13px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;display:block;}
.show_li b{font-size:14px;color:#FF0000;padding-right:5px}
.show_li del{font-size:12px;color:#666;}
.show_li .point{font-size:12px;color:green;display:block;}
</style>
<script type="text/javascript"> 
$(function(){
	$(window).scroll(function() {
		if ($(window).scrollTop()>150){
			$(".bt-top").css("position", "fixed");
		}else{
			$(".bt-top").css("position", "relative");
		}
	});
	$(".tpbtn").click(function() {
		if ($(this).hasClass("on")){
			$("#J_Shade").removeClass("none");
			$(".circle").removeClass("hide").addClass("show");
			$(this).removeClass("on").addClass("off");
		}else{
			$("#J_Shade").addClass("none");
			$(".circle").removeClass("show").addClass("hide");
			$(this).removeClass("off").addClass("on");
		}
		
	});
});
</script>
</head>
<body>
	<ul class="top-tool">
		<li class="title" style="font-size:14px;margin:20px;float:left;">商品中心</li>
		<li class="home"><span style="float:right;margin:20px;font-size:14px" onClick="window.location='../hongbao/productlist.php'">列表显示</span></li>
	</ul>
	<div style="height:50px"></div>
	<div class="pz-css" style="margin:0px 5px">
	<form  method="get" action="">
		<div class="inputs" style=";width:100%; margin: 5px auto">
			<input type="text" style="width:85%" name="key" placeholder="快速查找商品" value="<?=isset($_GET['key'])?$_GET['key']:''?>">
			<button class="gray" type="submit" style="background:url(../images/qry.png)  center no-repeat; width:15%">查找</button>
		</div>
	</form>
	</div>
	<ul class="panel_ul" style="background:#fff;">
<?php 
require_once ("../mobile/shop.php");
if (isset($_GET['key']) && $_GET['key'])
{
	$pro = getProductByKeyword($_GET['key']);
}
else
{
	$pro = getAllProduct();
}
while ($p = mysql_fetch_array($pro))
{
	// 	echo $p['name'];exit;
	echo "
		<li class='show_li'><!--<li class='list_li'>-->
			<div class='trade-panel'>
				<a href='../hongbao/productdetail.php?id=".$p['id']."'><img src='".$p['img']."' width='100%' height='150px'></a>
				<div class='trade-ds'>
					<span class='show_name'>".$p['name']."</span>
					<b>¥&nbsp;".$p['price']."</b>
				</div>
			</div>
		</li>
		";
}
?>
	</ul>
	    <div style="position:fixed; bottom:0px; width:100%; background:#f0f0f0;border-top:#ccc solid 1px; left:0px;">
	        <div style="padding:0px;position:relative;margin:8px 6px;">
	            <ul class="nav">
	                <li onClick="#">
	                 <img src="./images/58.png"><p>红包</p>
	                </li>
	                <li onClick="#">
	                    <img src="./images/62.png"><p>提现</p>
	                </li>
	                <li onClick="window.location='../hongbao/productshow.php'">
	                    <img src="./images/56.png"><p>产品</p>
	                </li>
	                <li style="border-right:none" onClick="location.href='#'">
	                    <img src="./images/65.png"><p>我的</p>
	                </li>
	            </ul>
	            <div style="clear:left">
	            </div>
	        </div>
	    </div>
</body>
</html>